package com.lapelife.backend.domain.request;

import lombok.Data;

@Data
public class PageRequest {
    private Integer current;
    private Integer size;

    public Integer getCurrent() {
        if (current == null) {
            return 1;
        }
        return current > 0 ? current : 1;
    }

    public Integer getSize() {
        if (size == null) {
            return 10;
        }
        return size > 0 && size <= 20 ? size : 10;
    }
}
